package cn.mxp.a02_factory.easy;

public class Factory01 {
    public static Car getCar(String name) {
        if ("Xiaomi".equals(name)) {
            return new Xiaomi();
        } else if ("Tesla".equals(name)) {
            return new Tesla();
        } else {
            return null;
        }
    }
}
